﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YXShop.IDAL.Templates;
using YXShop.DALFactory;

namespace YXShop.BLL.Templates
{
    public class Label
    {
        private readonly ILabel dal = DataAccess.CreateLabel();
        public int Create(YXShop.Model.Templates.Label model)
        {
            return dal.Create(model);
        }
        public int Amend(YXShop.Model.Templates.Label model)
        {
            return dal.Amend(model);
        }
        public int Delete(int id)
        {
           return dal.Delete(id);
        }
        public YXShop.Model.Templates.Label GetModelID(int id)
        {
            return dal.GetModelID(id);
        }
        public YXShop.Model.Templates.Label GetModelName(string name)
        {
            return dal.GetModelName(name);
        }
        public ChangeHope.DataBase.DataByPage GetList()
        {
            return dal.GetList();
        }

        public System.Data.DataTable GetPartData(string tid)
        {
            return dal.GetPartData(tid);
        }

        /// <summary>
        /// 统计每类标签个数
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int GetCount(int cid)
        {
            return dal.GetCount(cid);
        }
    }
}
